package com.company.project;

import com.company.project.core.FileProperties;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.scheduling.annotation.EnableScheduling;

import springfox.documentation.swagger2.annotations.EnableSwagger2;

/*
 * @Description:    入口
 * @Author:         brilliantzhao
 * @CreateDate:     2019/5/25 22:42
 * @UpdateUser:
 * @UpdateDate:     2019/5/25 22:42
 * @UpdateRemark:
 */
@SpringBootApplication
// 文件上传和下载需要添加
@EnableConfigurationProperties({
        FileProperties.class
})
@EnableSwagger2
// Spring的注解，用户是否实例化本类，用于是否启用Swagger的判断（生产环境需要屏蔽Swagger）
@ConditionalOnExpression("${swagger.enable:true}")
// 启用定时任务的配置
@EnableScheduling
public class Application {
    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);
    }
}

